<?php
$post = array(
    'title' => 'This is a title',
    'body' => 'this is the body. updated',
);
$xanga_id = false;

include('lib.xanga.php');

$xanga = new TanTanXanga();

if ($xanga->login('login', 'password')) {
    echo 'Passed';
    //echo $xanga->getLoginkey();
    //$xanga->deletePost(509709207);

    if ($xanga_post_id = $xanga->createPost($post)) {
        echo "Created post: $xanga_post_id<br />";
    } else {
        echo 'Create post failed!<br />';
    }
   
} else {
    echo 'Login failed!<br />';
}


?>